<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
  xmlns:s="http://jboss.org/schema/seam/taglib"
  xmlns:ui="http://java.sun.com/jsf/facelets"
  xmlns:f="http://java.sun.com/jsf/core"
  xmlns:h="http://java.sun.com/jsf/html"
  xmlns:rich="http://richfaces.org/rich"
  xmlns:a4j="http://richfaces.org/a4j"
  template="../WEB-INF/template/template_2x.xhtml">

  <ui:define name="page_title">#{msgs['jsf.ChangePassword']}</ui:define>
  <ui:define name="center_content">
    <h1>#{msgs['jsf.ChangePassword']}</h1>
    <h:form id="passwordChangeForm">
      <s:token allowMultiplePosts="true"/>
      <rich:panel>
        <f:facet name="header">#{msgs['jsf.ChangePassword']}</f:facet>
        <s:decorate id="passwordOldField"
          template="../WEB-INF/layout/edit.xhtml"
          rendered="#{not passwordChange.firstPasswordChange}" enclose="true">
          <ui:define name="label">#{msgs['jsf.OldPassword']}</ui:define>
          <h:inputSecret id="passwordOld" redisplay="true" required="true"
            value="#{passwordChange.passwordOld}">
            <a4j:ajax event="blur" render="passwordOldField"/>
          </h:inputSecret>
        </s:decorate>
        <s:decorate id="passwordNewField"
          template="../WEB-INF/layout/edit.xhtml" enclose="true">
          <ui:define name="label">#{msgs['jsf.NewPassword']}</ui:define>
          <h:inputSecret id="passwordNew" redisplay="true" required="true"
            value="#{passwordChange.passwordNew}">
            <a4j:ajax event="blur" render="passwordNewField"/>
          </h:inputSecret>
        </s:decorate>
        <s:decorate id="passwordConfirmField"
          template="../WEB-INF/layout/edit.xhtml" enclose="true">
          <ui:define name="label">#{msgs['jsf.ConfirmPassword']}</ui:define>
          <h:inputSecret id="passwordConfirm" redisplay="true" required="true"
            value="#{passwordChange.passwordConfirm}">
            <a4j:ajax event="blur" render="passwordConfirmField"/>
          </h:inputSecret>
        </s:decorate>

        <div style="clear:both"/>
        <div class="actionButtons">
          <h:commandButton id="changePasswordButton"
            value="#{msgs['jsf.ChangePassword']}"
            action="#{passwordChange.change}"/>
          <s:button id="cancelChangePasswordButton" view="/profile/view.xhtml"
            value="#{msgs['jsf.Cancel']}" propagation="end"/>
        </div>
      </rich:panel>
    </h:form>
  </ui:define>


</ui:composition>
